<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import {onekeyGroupApi} from '@/feature/ag/infra/api/onekeyGroupApi'
import {onekeyApi} from '@/feature/ag/infra/api/onekeyApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: onekeyApi,


        showSelection: true,
        columns: [
          {
            label: '组',
            searchable: true,
            required: true,
            prop: 'groupId',
            type: ColumnType.SELECT,
            options: onekeyGroupApi.listAll()
          },
          {
            label: '联系人',
            searchable: true,
            span: 24,

            required: true,
            prop: 'userName'
          },
          {
            label: '联系方式',
            searchable: true,
            span: 24,
            width: 'auto',
            required: true,
            prop: 'userPhone'
          },
          {
            label: '通讯地址',
            searchable: true,
            span: 24,
            width: 'auto',
            required: true,
            prop: 'userPost'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          },
          {
            label: '排序号',
            span: 24,
            required: true,
            width: 80,
            defaultValue: 0,
            prop: 'sortNum',
            type: ColumnType.NUMBER
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

